import request from '@/utils/request'

function tableList(query) {
  return request({
    url: '/table/list',
    method: 'get',
    params: query
  })
}
function genCode(query) {
  return request({
    url: '/table/code',
    method: 'post',
    params: query
  })
}
function menuList(query) {
  return request({
    url: '/menu/list',
    method: 'get',
    params: query
  })
}
function saveMenu(menu) {
  return request({
    url: '/menu/menu',
    method: 'post',
    data: menu
  })
}
function removeMenu(ids) {
  return request({
    url: '/menu/menu',
    method: 'delete',
    data: ids
  })
}
export default {
  tableList,
  genCode,
  menuList,
  saveMenu,
  removeMenu
}
